package com.itheima.jiuye;

public class Test {
	public static void main(String[] args) {
		Teacher teacher = new Teacher();//一处数据改变.多处得到通知
		// 告诉学生关注自己说的事情
		teacher.addObserver(new Student1());
		teacher.addObserver(new Student2());
		teacher.addObserver(new Student3());
		teacher.addObserver(new Student4());
		teacher.addObserver(new Student5());

		// 老师说一段话

		teacher.doPublishMessage("班上xx同学,拿到了一个12k的offer");

	}
}
